|
Localização do menu |
---|
Sketch → Sketcher constraints → Constrain angle |
Bancadas de trabalho |
Sketcher, PartDesign |
Atalho padrão |
A |
Introduzido na versão |
- |
Veja também |
Constraint Length, Constraint Perpendicular |
The Sketcher ConstrainAngle tool fixes the angle between two edges (lines are then treated as infinite, and open curves are virtually extended as well), the angle of a line with the horizontal axis of the sketch, or the aperture angle of a circular arc.
See also: Drawing aids.
Single tool
(default): press the down arrow to the right of the The angle of the line with the positive X axis of the sketch is fixed.
The aperture angle of the arc is fixed.
The angle between the two lines is fixed. It is not required that the lines intersect.
The angle between the two edges at a given point is fixed. The point can be any point, e.g. the center of a circle, the endpoint of an edge, or the origin, it can belong to either or both edges, and it can also be a Point object. If required Point on object constraint(s) are added to ensure the point lies on both (extended) edges. These additional constraints are called helper constraints.
Angle Constraint can be created from macros and from the Python console by using the following:
# line slope angle
Sketch.addConstraint(Sketcher.Constraint('Angle',iline,angle))
# angular span of arc
Sketch.addConstraint(Sketcher.Constraint('Angle',iarc,angle))
# angle between lines
Sketch.addConstraint(Sketcher.Constraint('Angle',iline1,pointpos1,iline2,pointpos2,angle))
# angle-via-point (no helper constraints are added automatically when from python)
Sketch.addConstraint(Sketcher.Constraint('AngleViaPoint',icurve1,icurve2,geoidpoint,pointpos,angle))
where:
Sketch
is a sketch objectiline, iline1, iline2
are integers specifying the lines by their ordinal numbers in Sketch
.pointpos1, pointpos2
should be 1 for start point and 2 for end point. The choice of endpoints allows to set internal angle (or external), and it affects how the constraint is drawn on the screen.geoidpoint
and pointpos
in AngleViaPoint
are the indexes specifying the point of intersection.angle
is the angle value in radians. The angle is counted between tangent vectors in counterclockwise direction. Tangent vectors are pointing from start to end for the lines (or vice versa if ending point is supplied in angle between lines mode), and along counterclockwise direction for circles, arcs and ellipses. Quantity is also accepted as an angle (e.g. App.Units.Quantity('45 deg')
)The Sketcher scripting page explains the values which can be used for iline
, iline1
, iline2
, pointpos1
, pointpos2
, geoidpoint
and pointpos
and contains further examples on how to create constraints from Python scripts.